//统一管理的api文件 ，api出错的话，只需要查找和修改该文件就好了
import request from '@/utils/request';

//调用 api
//仪表盘和设备概览的数据
export const $deviceCount = () => request.get('/device/count');


// 获取图表的数据
export const $senserCount = () => request.get('/sensor/count');
//设备列表数据 /device/sensorList
export const $sensorList = () => request.get('/device/sensorList');
//网关列表 /gateway/list
export const $gatewayList = (params) => request.get('/gateway/list', { params });
export const $servegroupList = (params) => request.get('/group/list', { params });
export const $cgqList = (params) => request.get('/sensor/list', { params });
export const $usedList = (params) => request.get('/fee/usageList', { params });
export const $spentList = (params) => request.get('/fee/rechargeList', { params });


// 添加金额
export const $feeAdd = (data) => request.post('/fee/recharge', data);
//查询 用户金额
export const $feeSelect = () => request.get('/fee/balance');


export const $groupAdd = (data) => request.post('/group/add', data);
export const $groupEdit = (data) => request.post('/group/edit', data);
export const $groupDel = (data) => request.post('/group/del', data);

export const $testAdd = (data) => request.post('/measurement/add', data);
export const $testEdit = (data) => request.post('/measurement/edit', data);
export const $testDel = (data) => request.post('/measurement/del', data);
export const $testList = (params) => request.get('/measurement/list', { params });

export const $safeAdd = (data) => request.post('/security/add', data);
export const $safeList = (params) => request.get('/security/list', { params });
export const $safeEdit = (data) => request.post('/security/edit', data);
export const $safeDel = (data) => request.post('/security/del', data);

export const $addaccount = (data) => request.post('/account/add', data);
export const $accountlist = (params) => request.get('/account/list', { params });
export const $accountEdit = (data) => request.post('/account/edit', data);
export const $accountDel = (data) => request.post('/account/del', data);
